package multithread;

public class MyRunnable implements Runnable{
    private String who;

    public MyRunnable(String str) {
        who = str;
    }

    @Override
    public void run() {
        for(int i=0;i<5;i++){
            try {
                Thread.sleep((int)(Math.random()*1000));
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println(who+"正在运行");

        }


    }


}
